package com.mingshashan.building.easy.core.exception;

/**
 * EasyErrorCoded
 *
 * @author jasonxu
 */
public enum EasyErrorCoded implements ErrorCoded {

    // positon
    POSITION_NOT_EXIST_BY_ID("EASY.POSITION.004001"),
    POSITION_CODE_EMPTY("EASY.POSITION.004002"),

    // dictionary
    DICT_NOT_EXIST_BY_ID("EASY.DICT.004001"),
    DICT_NOT_EXIST_BY_CODE("EASY.DICT.004002"),
    DICT_ALREADY_EXIST_BY_CODE("EASY.DICT.004003"),
    DICT_PARENT_NOT_EXIST_BY_CODE("EASY.DICT.004004"),
    DICT_CODE_NOT_EQUAL_TO_PARENT_CODE("EASY.DICT.004005");


    private String code;

    private EasyErrorCoded(String code) {
        this.code = code;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getErrorName() {
        return this.name();
    }
}
